package com.bestdreamer.thread_join;

public class Demo1ThreadB extends Thread {

    @Override
    public void run() {
        try{
            System.out.println(" threadB run begin timer = " + System.currentTimeMillis());
            Thread.sleep(5000);
            System.out.println(" threadB run end timer = " + System.currentTimeMillis());
        }catch (InterruptedException e){
            e.printStackTrace();
        }
    }

    synchronized
    public void bService(){
        System.out.println("打印了 bService timer = " + System.currentTimeMillis());
    }
}
